import { ApiProperty } from '@nestjs/swagger';
import { IsNotEmpty, IsNumber, IsString, Min } from 'class-validator';

export class CreateRoomDto {
  @ApiProperty({ description: '房间类型', example: '标准间' })
  @IsString()
  @IsNotEmpty({ message: '房间类型不能为空' })
  roomType: string;

  @ApiProperty({
    description: '房间价格',
    example: 299,
    minimum: 0,
  })
  @IsNumber()
  @Min(0, { message: '价格不能为负数' })
  price: number;

  @ApiProperty({
    description: '房间状态',
    example: '空闲',
    enum: ['空闲', '已预订', '已入住', '维修中'],
  })
  @IsString()
  @IsNotEmpty({ message: '房间状态不能为空' })
  status: string;

  @ApiProperty({ description: '酒店ID', example: 1 })
  @IsNumber()
  @IsNotEmpty({ message: '酒店ID不能为空' })
  hotelID: number;
}
